<template>
  <div class="avter">
    <el-dropdown :hide-on-click="false">
      <span class="el-dropdown-link">
        <el-avatar src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png" />
      </span>
      <template #dropdown>
        <el-dropdown-menu>
          <el-dropdown-item @click="backlogin">{{ $t(`login.back`) }}</el-dropdown-item>
        </el-dropdown-menu>
      </template>
    </el-dropdown>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
import { LoginStore } from '../store/login'
export default defineComponent({
  setup() {
    const loginstore = LoginStore()
    const backlogin = () => {
      loginstore.timeoutlogin()
    }
    return {
      backlogin
    }
  }
})
</script>

<style lang="scss" scoped>
.avter {
  display: flex;
  align-items: center;
}
::v-deep .el-dropdown-menu__item {
  color: #fff !important;
  background-color: red !important;
}
</style>
